<?php

class Actions{

	private static $actions = array();

	public static function addAction( $name, $vars ){
		self::$actions[$name] = 'section='.Router::getSection()."&$vars";
	}

	public static function countActions(){
		return count( self::$actions );
	}

	public static function render(){
		ob_start();

?>

<ul class='menu'>
	<li>Actions:</li>
	<?php foreach( self::$actions as $a=>$v ): ?>
		<li><a href='index.php?<?php echo $v ?>'><?php echo $a ?></a></li>
	<?php endforeach; ?>
</ul>

<?php
		$output = ob_get_contents();
		ob_end_clean();
		return $output;
	}
}
